{extend name="admin@index_layout"/}
{block name="main"}
<form class="layui-form" action="" method="post">
    {empty name="custom_config"}
        <div class="layui-card">
            <div class="layui-card-header">插件配置-{$data.title}</div>
            <div class="layui-card-body">
            {foreach name="data['config']" item="form" key="o_key"}
                 {switch name="form.type"}
                        {case value="group"}
                            <div class="site-text layui-elem-quote" {if $form.style}style="{$form.style}"{/if}>{$form.title|raw}</div>
                            {foreach name="form.options" item="subform" key="os_key"}
                                {php} $form = $subform; $o_key = $os_key; {/php}
                                {switch name="subform.type"}
                                    {include file="addons/config_items" /}
                                {/switch}
                            {/foreach}
                            {if $baseform.line}
                                <div class="layui-form-item">
                                    <hr class="layui-bg-{$baseform.line.color|default='gray'}" {if $baseform.line.style}style="{$baseform.line.style}"{/if}>
                                </div>
                            {/if}
                        {/case}
                        {include file="addons/config_items" form="$form" o_key="$o_key" /}
                 {/switch}
            {/foreach}
            </div>
        </div>
    {else /}
        {present name="custom_config"}
        {$custom_config|raw}
        {/present}
    {/empty}
    <input type="hidden" name="id" value="{:input('id')}" readonly>
    <div class="layui-form-item">
        <button class="layui-btn" lay-submit="" lay-filter="formSubmit">立即提交</button>
        <button class="layui-btn layui-btn-normal" type="button" onclick="javascript:history.back(-1);">返回</button>
    </div>
</form>
<script type="text/javascript" src="__STATIC__/admin/js/form.js?t=1590725734"></script>
{/block}
